package com.xinqi.modules.sys.textbook.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.sys.textbook.dto.req.CloudTextbookContentQueryDTO;
import com.xinqi.modules.sys.textbook.dto.rsp.CloudTextbookContentResultDTO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author linkai
 * @date 2023/5/28
 */
@FeignClient(contextId = "cloudTextbookContentClient", value = ServiceNameConstants.XQ_SYS)
public interface CloudTextbookContentClient {

    /**
     * 云课本课堂内容-分页
     */
    @Operation(summary = "云课本课堂内容-分页")
    @GetMapping("/inner/cloud-textbook/content/page")
    R<PageInfo<CloudTextbookContentResultDTO>> page(@SpringQueryMap CloudTextbookContentQueryDTO dto);

    /**
     * 云课本课堂内容-详情
     */
    @Operation(summary = "云课本课堂内容-详情")
    @GetMapping("/inner/cloud-textbook/content/{id}")
    R<CloudTextbookContentResultDTO> findById(@PathVariable("id") Long id);


    /**
     * 云课本课堂内容-列表
     */
    @Operation(summary = "云课本课堂内容-列表")
    @GetMapping("/inner/cloud-textbook/find-content-by-cloud-textbook-id")
    R<List<CloudTextbookContentResultDTO>> findByCloudTextbookId(@RequestParam("textBookId") Long textBookId);

}
